let setting = {};
//电梯类型 0：直梯、1、扶梯
//电梯状态 1：停梯，0：恢复
//selectOption下拉
setting.liftType = [
    {label:'直梯',val:'0'},
    {label:'扶梯',val:'1'},
]

// table字段
setting.columns = [
    {
        label: "电梯工号",
        prop: "baseInfoLiftNumber",
        width: 180
    },
    {
        label: "设备代码",
        prop: "baseInfoLiftDeviceCode",
        width: 180,
        tooltip: true
    },
    {
        label: "唯一识别码",
        prop: "baseInfoLiftIdentificationCode",
        width: 180,
        tooltip: true
    },
    {
        label: "注册代码",
        prop: "baseInfoLiftRegisterCode",
        width: 190,
        tooltip: true
    },
    {
        label: "出厂编号",
        prop: "baseInfoLiftExitFactoryCode",
        width: 180,
        tooltip: true
    },
    {
        label: "层/站/门",
        prop: "baseInfoLiftStoreyStandDoor",
        width: 120
    },
    {
        label: "电梯类型",
        prop: "baseInfoLiftType",
        width: 120,
        formatter: function (row, column) {
            switch (row.baseInfoLiftType) {
                case '0':
                    return '直梯'
                    break;
                case '1':
                    return '扶梯'
                    break;
                default:
                    return '未知'
            }
        }
    },
    {
        label: "使用单位",
        prop: "unitName",
        width: 160,
        tooltip: true
    },
];

setting.baseInfo = [
    {
        label: "电梯工号",
        prop: "baseInfoLiftNumber",
    },
    {
        label: "层/站/门",
        prop: "baseInfoLiftStoreyStandDoor",
    },
    {
        label: "使用单位",
        prop: "unitName",
    },
    {
        label: "电梯类型",
        prop: "baseInfoLiftType",
        formatter: function (row, column) {
            switch (row.baseInfoLiftType) {
                case '0':
                    return '直梯'
                    break;
                case '1':
                    return '扶梯'
                    break;
                default:
                    return '未知'
            }
        }
    },
];



setting.rules = {
    a: [{
        required: true,
        message: "请输入",
        trigger: "blur"
    }],
    b: [{
        required: true,
        message: "请选择",
        trigger: "change"
    }],
    c: [
        { required: true, message: "请输入", trigger: "blur"},
        { min: 20, max: 20, message: '请输入20位长度', trigger: 'blur' }
    ]
}


export default setting;
